package com.qd.common.panda.domain.entity.advertisement;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 广告信息
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class AdvertisementDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "广告ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "广告ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String advertisementId;
    /**
     * 标题
     */
    @Size(max = 200, message = "标题长度不能超过{max}位", groups = DefaultGroup.class)
    private String title;
    /**
     * 宣传图片
     */
    @Size(max = 200, message = "宣传图片长度不能超过{max}位", groups = DefaultGroup.class)
    private String pic;
    /**
     * 宣传图片显示
     */
    private String picDisplay;
    /**
     * 广告位置
     */
    @Size(max = 50, message = "广告位置长度不能超过{max}位", groups = DefaultGroup.class)
    private String location;
    /**
     * 广告位置显示
     */
    private String locationDisplay;
    /**
     * 跳转地址
     */
    @Size(max = 200, message = "跳转地址长度不能超过{max}位", groups = DefaultGroup.class)
    private String jumpUrl;
    /**
     * 跳转参数
     */
    @Size(max = 500, message = "跳转参数长度不能超过{max}位", groups = DefaultGroup.class)
    private String jumpParam;
    /**
     * 跳转类型
     */
    @Size(max = 50, message = "跳转类型长度不能超过{max}位", groups = DefaultGroup.class)
    private String jumpType;
    /**
     * 跳转类型显示
     */
    private String jumpTypeDisplay;
    /**
     * 背景颜色
     */
    @Size(max = 100, message = "背景颜色长度不能超过{max}位", groups = DefaultGroup.class)
    private String bgColor;
    /**
     * 排序
     */
    private Integer idx;
    /**
     * 添加时间
     */
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    private LocalDateTime updateTime;
    /**
     * appid
     */
    private String appid;
    /**
     * 是否启用
     */
    @Size(max = 50, message = "是否启用长度不能超过{max}位", groups = DefaultGroup.class)
    private String enable;
    /**
     * 是否启用显示
     */
    private String enableDisplay;

    @Override
    public void freeData() {
        this.advertisementId = null;
        this.title = null;
        this.pic = null;
        this.picDisplay = null;
        this.jumpUrl = null;
        this.jumpParam = null;
        this.bgColor = null;
        this.idx = null;
        this.addTime = null;
        this.updateTime = null;
        this.location = null;
        this.locationDisplay = null;
        this.jumpType = null;
        this.jumpTypeDisplay = null;
        this.appid = null;
        this.enable = null;
        this.enableDisplay = null;
        super.freeData();
    }
}
